/*
 * 
 *  $Author: nfelipe$
 * 
 *  Copyright (c) 2011 by PROS Revenue Management.  All Rights Reserved.
 *  This software is the confidential and proprietary information of
 *  PROS Revenue Management ("Confidential Information").
 *  You shall not disclose such Confidential Information and shall use it
 *  only in accordance with the terms of the license agreement you entered
 *  into with PROS.
 * 
 */

package javaapplication2;

import java.util.*;

/**
 *
 * @author Nestor Felipe
 */
public class Collection_verification {
    public static void main(String[] args){
        ArrayList<Pixel> pixels = new ArrayList<Pixel>();
        pixels.add(new Pixel());
        pixels.add(new Pixel(1, 1));
        pixels.add(new Pixel(-3, 9));
        showCollection(pixels);

        Pixel p1 = new Pixel(-4, 7);
        Pixel p2 = new Pixel();
        System.out.println(pixels.contains(p1));
        System.out.println(pixels.contains(p2));
    }
    public static void showCollection(List<Pixel> list){
        Iterator<Pixel> itr = list.iterator();
        Pixel current = null;

        while(itr.hasNext()){
            current = itr.next();
            System.out.println("x = " + current.getX() + ", y = " + current.getY());
        }
        
    }
}
